<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\Request;

class ActivityeditRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {   
        return [
           
            'keywords'=>'required',
            'description'=>'required',
            'photo'=>'mimes:jpeg,bmp,png,jpg',
            'link'=>'required'
        ];
    }
    public function messages()
    {
        return  [
            'photo.mimes'=>'请上传jpeg,bmp,png,jpg的图片',
            'keywords.required' => '关键词必须填写',
            'description.required' => '描述必须填写',
            'link.required' => '活动位链接必须填写',
        ];
    }
}
